﻿using Services.Equ.PcapCommunication.Abstract;
using SharpPcap;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;

namespace Services.Equ.PcapCommunication
{
    public class WriteCommnuication : AbstractPcapWriteCommunication
    {
        /// <summary>
        /// 写入文件操作通讯类
        /// </summary>
        /// <param name="destinationMac"></param>
        /// <param name="password"></param>
        /// <param name="device"></param>
        public WriteCommnuication(PhysicalAddress destinationMac, string password, ILiveDevice device) : base(destinationMac, password, device)
        {
            ReciveBreak = 1;
            RpcType = 1;
            OpType = 4;
            DcpType = 0x40001;
        }

        public override byte[] CreateBlockData()
        {
            return [];
        }
        //public override byte[] GetPayload()
        //{
        //    var blockData = CreateBlock();
        //    var blockHeader = CreateRpcBlockHeader(12);
        //    var header = CreateRpcHeader(blockHeader.Length + 12);
        //    return [
        //        ..Frame,
        //        ..header,
        //        ..blockHeader,
        //        ];
        //}
    }
}
